package homewoek12月30号.homework.h3;

import java.util.Objects;

public class Course {
    private String chour;
    private String cname;
    private String cid;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Course course = (Course) o;
        return Objects.equals(chour, course.chour) &&
                Objects.equals(cname, course.cname) &&
                Objects.equals(cid, course.cid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(chour, cname, cid);
    }

    @Override
    public String toString() {
        return "Course{" +
                "chour='" + chour + '\'' +
                ", cname='" + cname + '\'' +
                ", cid='" + cid + '\'' +
                '}';
    }

    public Course() {
    }

    public Course(String chour, String cname, String cid) {
        this.chour = chour;
        this.cname = cname;
        this.cid = cid;
    }

    public String getChour() {
        return chour;
    }

    public void setChour(String chour) {
        this.chour = chour;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }
}
